home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 016 / ds.arc / DS.DOC < prev   
Encoding:
Text File  |  1987-03-09  |  16.8 KB  |  353 lines

  1.                            Dura Screen
  2.                 (C)Copyright J. Adkins 1986, 1987.
  3.                          P.O. Box 1160
  4.                         Rialto, CA 92376
  5.  
  6. Released to public domain 3/9/87
  7.  
  8. ******************************************************************************
  9. This program represents many hours of work. You are encouraged to give away as
  10. many copies as you want. A donation of any amount will be greatly appreciated.
  11. Please send donations to the above address.
  12. ******************************************************************************
  13.  
  14. INSTRUCTIONS FOR USING DURA SCREEN.   (C)Copyright J. Adkins 1986.
  15.  
  16. DURA SCREEN generates fancy color menus and input screens. The number of colors
  17. and complexity of the generated screens are almost unlimited. It must be
  18. mentioned, however, that a large number and variety of colors will cause your
  19. generated program to be larger. A simple one color program might require 50
  20. lines. A program that generates a rainbow of colors and dozens of screen
  21. inputs can go over 500 lines.
  22.  
  23. Files are written to disk in 8 different formats:
  24.  
  25. DISK FILE:
  26. A file is saved that contains all the necessary information to write a
  27. program. It is suggested that you use this mode to save all your projects.
  28. Later, it can be retrieved and programs can be generated.
  29.  
  30. STANDARD SCREENS:
  31. The generated code is designed to work on most all computer systems that can
  32. support Turbo Pascal.
  33.  
  34. IBM SCREENS:
  35. The generated code will only work on IBM or close compatible screens because
  36. the output is sent directly to the screen memory. These screens are about 10
  37. times faster than the standard screens that use the writeln statement. This
  38. code and the standard screen code can be used in other Turbo Pascal programs.
  39.  
  40. BASIC SCREENS:
  41. The generated code is written to a disk file in the BASICA language format.
  42. Most IBM color compatible systems should be able to execute this code. You
  43. can also merge it into other BASIC programs.
  44.  
  45. C LANGUAGE SCREENS:
  46. Non-Color graphics screens are generated in C. The screen color attributes
  47. aren't yet supported in this format.
  48.  
  49. ASSEMBLER SCREENS:
  50. Like the C Language screens, The screen color attributes aren't yet supported.
  51. The generated code can be assembled, linked and executed.
  52.  
  53. PROLOG SCREENS:
  54. Screen color attributes are supported, however, it is wise to stick with
  55. fewer colors. Screen input variables of String, Integer and Real are
  56. supported, but type checking is not done on the input.
  57.  
  58. DBASE III + SCREENS
  59. A 'PRG' file will be created. Screen variable type and length checking is
  60. performed. All screen color attributes are supported.
  61.  
  62. ANSI COMPATIBLE SCREENS
  63. These files can be 'typed' directly from dos. In order for them to work
  64. properly, the following line should be added to your CONFIG.SYS file:
  65.                    device = ansi.sys
  66. The ANSI.SYS driver will use all the color attributes and cursor locating
  67. commands to display the file. You can really dress up batch files with this
  68. feature.
  69.  
  70. ASCII FILE:
  71. A duplicate of your screen (minus color attribute) is saved to a disk file.
  72. This file can be 'typed' directly from DOS, or dumped to a printer by using
  73. a dump utility program. These screens can also be read by Dura Screen with
  74. the 'A' command. Any language capable of displaying block graphics should be
  75. able to read and display these screens. They can be used to dress up batch
  76. files by using the 'TYPE' statement. The following is an example that assumes
  77. you have created and saved a screen called MENU.DAT. Use the Turbo editor andècreate the following batch file called TEST.BAT.
  78.  
  79. PROMPT $P $G YOUR COMMAND
  80. ECHO OFF
  81. CLS
  82. TYPE MENU.DAT
  83.  
  84. This is the start of an elementary DOS Menu system. It only illustrates some
  85. of the possibilities of Dura Screen.
  86.  
  87.  
  88. ***********************************************************
  89. Compiling Dura Screen:
  90.  
  91. The source code for Dura Screen is NOT in public domain. To acquire a copy,
  92. send $30 to:
  93. J. Adkins
  94. Box 1160
  95. Rialto, CA 92376
  96.  
  97. IMPORTANT!!! Use the following sequence of commands to compile Dura Screen.
  98. First, load Turbo Pascal. Type the following commands (without the comments).
  99.  
  100. W
  101. DS     <cr>
  102. OC     { As in OSCAR CHARLIE }
  103. A
  104. 100    { Number 100 }
  105. I      { As in Ivan }
  106. 0      { Zero }
  107. Q      { As in Quit }
  108. C      { As in Compile }
  109.  
  110. The parameters prevent the program from using all the stack space.
  111.  
  112.  
  113. GENERIC MS-DOS MACHINES
  114. If your machine isn't fully IBM compatible, you may want to avoid the fast
  115. screen procedures in ds. Two extra include files are provided for you to use
  116. if your machine has a different video address than IBM. Change the include
  117. section of DS.PAS as suggested:
  118.  
  119. {$I DSMON.INC}
  120. {$I DSFW.INC}
  121. {$I DSEXIST.INC}
  122. {$I DSEXCHG.INC}
  123. {$I DSDIR.INC}
  124. {$I DSCOLOR.INC}
  125. {$I DSEXEC.INC}
  126. {$I DSBORD.INC}
  127. {$I DSLOGO.INC} { Replace with LOGO.INC if not true IBM compatible }
  128. {$I DSVALS.INC}
  129. {$I DSANSI.INC}
  130. {$I DSIO.INC}
  131. {$I DSVIEW.INC} { Replace with VIEW.INC if not true IBM compatible }
  132.  
  133.  
  134. DURA SCREEN COMMANDS
  135.  
  136. From the DOS prompt, type DS and press the ENTER key. The screen will go
  137. blank and you will see a one line menu at the bottom of the screen. It is
  138. impossible to display all the DURA SCREEN commands on one line. The most often
  139. used ones are displayed.
  140.  
  141. CURSOR CONTROL: The arrow keys move the cursor up/down/right/left. Get the feel
  142.                 of the cursor movement by experimenting with the arrow keys.
  143.                 The keypad must be locked in the cursor control mode.
  144.  
  145.  
  146. A               Import ASCII: Files that were created by other programs can be
  147.                 read by Dura Screen. If you want to start with a clear screen,
  148.                 you should use the 'E' command before importing the file.
  149.  
  150. G               The GET command: press G on the keyboard (upper or lower case)
  151.                 and a display of all the ASCII characters will be displayed on
  152.                 the screen. Pick the number corresponding to the ASCII char-
  153.                 acter you want to use in your sketch on the screen. Just as an
  154.                 exercise, type in 176 and press the ENTER key. Move the cursor
  155.                 with the arrow keys and see what happens. You will see a fancy
  156.                 pattern move in the direction of the arrow key. DURA SCREEN
  157.                 is actually drawing while using this pattern (176).
  158.  
  159. ENTER           Pressing Enter resets the cursor mode so you can move around
  160.                 the screen without disrupting anything you have created. Moveè                the cursor near the top of the screen and to the left to
  161.                 10, 5. (The positions are displayed at the top left of the
  162.                 screen).
  163.  
  164. B               Draws a box. Press the B key. Look at the bottom of the screen.
  165.                 You will see a choice: Single or Double line box. Press D on
  166.                 the keyboard. Look at the bottom of the screen again. Move the
  167.                 cursor to the opposite diagonal corner of where you want your
  168.                 box to end, then press the X key. A box will appear.
  169.  
  170. C               Color change. Press the C key on the keyboard. Press the T key.
  171.                 To select the Text color. At the bottom of the screen, you
  172.                 you will see 15 color choices. key in the number ( 1 thru 30)
  173.                 corresponding to the color of your choice. Now move the cursor
  174.                 up to the left top inside our box and to draw another box by
  175.                 pressing the B key. Colors above 16 are blinking colors. DURA
  176.                 SCREEN will use them, but they aren't displayed in the color
  177.                 selection. Press the G key again and select pattern 196. Now
  178.                 move the cursor with the arrow keys and see what happens.
  179.  
  180. D               Erase a portion of the screen. Move the cursor to the
  181.                 opposite diagonal corner to erase and press the 'X' key.
  182.  
  183. E               Erase the entire screen and start over.
  184.  
  185. T               Key in text. Move the cursor near the center of the screen.
  186.                 Press T on the keyboard. Type in some text (a few words). and
  187.                 press the ENTER key. Now you can begin to visualize using
  188.                 DURA SCREEN to design a fancy color menu program procedure or
  189.                 subroutine.
  190.  
  191. I               Input variable. Do you like those fancy programs that have
  192.                 nice input screens? You know, the ones that jump to different
  193.                 screen positions for your input? Press I on the keyboard.
  194.                 Look at the bottom of the screen. Press S (for string).
  195.                 Dura Screen will ask for a string length. This makes it
  196.                 possible to do strict length checking in your programs.
  197.                 Move the cursor to another place on the screen. Press I again.
  198.                 press S again.
  199.                 Integer and real variables are also provided for. Strict type
  200.                 checking will be done in your generated program to prevent the
  201.                 operator from keying in the wrong value (string for integer,
  202.                 etc) or crashing the program.
  203.  
  204. S               Save program to disk. Press S on the keyboard. Press D (for
  205.                 disk file). This way, you can use the code later if you
  206.                 decide to modify it. Key in the filename (no extension).
  207.                 A good name would be TEST. Key in TEST and press ENTER.
  208.                 Press S again (now we want to write a program). Key in the
  209.                 filename (no extension). Press P for PASCAL program, B for a
  210.                 BASIC program, E for an ANSI, L for PROLOG, etc.
  211.  
  212.                 It is strongly suggested that you use 'F' to save ALL of
  213.                 your work. This is the only file format that can be re-used
  214.                 for everything.
  215.  
  216.                 Your file can also be saved in ASCII format. These files can
  217.                 be 'typed' directly from DOS, used in BATCH files, or read by
  218.                 any program capable of displaying block graphics. It must beè                remembered, however, that only the <D> type of file can be
  219.                 re-used by Dura Screen, because they contain all the infor-
  220.                 mation needed to write a program.
  221.  
  222.                 The files saved with the 'E' (ANSI) format can be 'typed' from
  223.                 DOS, and will display all the color attributes, etc. For these
  224.                 files to be successfully displayed, you must have the follow-
  225.                 ing line in your CONFIG.SYS file:
  226.                           DEVICE=ANSI.SYS
  227.                 If the CONFIG.SYS FILE doesn't exist, you must create one.
  228.                 Here is a suggested method:
  229.                 COPY CON CONFIG.SYS              <PRESS ENTER>
  230.                 DEVICE=ANSI.SYS                  <PRESS ENTER>
  231.                                                  <PRESS F6, ENTER>
  232.                 Also, 'ANSI.SYS' must be in the root directory. ANSI.SYS is a
  233.                 device driver that enhances the display and keyboard capa-
  234.                 bility of your PC.
  235.  
  236.  
  237. L               Load program file. Press L on the keyboard. Key in the filename
  238.                 that you previously saved with the S command. The program file
  239.                 you previously saved will now appear on the screen. If no
  240.                 extension is given, then '.DSD' is assumed. If an '.ANS'
  241.                 extension is typed, then an ANSI compatible file will be
  242.                 expected. For loading ASCII files, use the 'A' command.
  243.  
  244. V               View commands. Press V on the keyboard. A list of commands will
  245.                 appear on the screen. Press any key to return to your sketch.
  246.  
  247. /               CUT & PASTE: Imagine you would like to move a block of the
  248.                 screen to a new location. This command allows you move a
  249.                 section from the screen to another location on the screen.
  250.                 This command should be used with caution. It should be
  251.                 used before any of the 'I' ( Input Variable ) commands.
  252.  
  253. >               EXECUTE DOS: This command allows you to execute most of the
  254.                 DOS commands, or run another program from Dura Screen. To
  255.                 Re-Enter Dura Screen from the DOS prompt, type EXIT and press
  256.                 ENTER.
  257.  
  258. Q               Quit. Press Q on the keyboard. Press Y.
  259.  
  260. RUNNING YOUR PROGRAM UNDER BASIC: Insert a diskette that has a copy of BASIC
  261. into drive B:
  262. (GWBASIC, BASICA, BASIC, ETC. We will assume it's called BASIC).
  263. Type B:BASIC and press ENTER.
  264. Remove the BASIC diskette. Place your DURA SCREEN diskette in drive B:
  265. Type RUN"B:TEST" and press enter. (This is assuming you called your generated
  266. BASIC program "TEST").
  267. Type SYSTEM to exit BASIC.
  268.  
  269. RUNNING YOUR PROGRAM UNDER TURBO PASCAL: Insert Turbo Pascal diskette in drive
  270. A: insert DURA SCREEN diskette in drive B:
  271. Type A: press ENTER.
  272. Type TURBO    press ENTER.
  273. Press Y
  274. Press L
  275. Press B
  276. Press ENTER.
  277. Press W
  278. type TEST (assuming that's what you called your Pascal program).
  279. Press ENTER.
  280. Press R to run the program.
  281.  
  282. USING CAPTURE.COM: From the DOS prompt, type CAPTURE and press ENTER.
  283. Now, run any program that has a nice menu you would like to capture. When
  284. the screen appears that you would like to work with, press <SHIFT><PRTSC>,
  285. the same as if you were going to dump the screen to printer. A file will
  286. be created 'DS.ASC' that you can work with in DURA SCREEN with the 'A'
  287. (Import ASCII) command. This allows you to use nice block graphic screens
  288. from other programs in DURA SCREEN.
  289. è
  290.                                 NOTES:
  291.  
  292. DURA SCREEN uses block graphics only. It could run on systems that don't
  293. have a graphics card installed. At least it could be easily modified
  294. to run on a particular system. It mainly uses 2 arrays. One array is for
  295. the screen x,y coordinates, the other is for the color attribute. It
  296. doesn't depend on video ram addresses or execute any machine dependent
  297. procedures. It will, however, write IBM specific programs {at your option)
  298. for maximum speed.
  299. The source code is provided with DURA SCREEN so you can modify it to suit your
  300. own needs. The modified program may NOT be resold for profit,
  301.  
  302. With a little practice, DURA SCREEN can be utilized to create some SPECTACULAR
  303. color screens with formatted input. These programs can be merged into your
  304. own programs.
  305.  
  306.                    MERGING YOUR CODE INTO OTHER PROGRAMS:
  307.  
  308. Let's say you have just written a terrific program. However, you haven't yet
  309. taken the time to polish things up a bit. You run DURA SCREEN and create a
  310. fancy menu. Now, how do we get it into your program?
  311.  
  312. TURBO PASCAL: (This assumes you know how to use Turbo Pascal).
  313.               Load your program into the Turbo Editor. Move the cursor to the
  314.               exact position you would like to place the fancy menu. Use the
  315.               Load block from disk command. EXAMPLE:
  316.               Hold down the CTRL key and press the K key.
  317.               Press the R key.
  318.               Answer the prompt (Read block from file:) Type TEST.PAS
  319.               (or whatever you called the fancy menu).
  320.               The TEST.PAS menu code will appear in your program.
  321.               You will have to modify the TEST.PAS code a bit.
  322.               Change Program Test;
  323.               to:    Procedure Test;
  324.               Change End.
  325.               to     End;
  326.  
  327. BASIC:        From the DOS system, type BASIC and press ENTER.
  328.               Insert the diskette that holds the fancy menu TEST.BAS  ...
  329.               into drive B:
  330.               Type LOAD"B:TEST"  and press ENTER.
  331.               Now we must determine the line number range to make sure
  332.               TEST.BAS will insert itself in the correct place in your
  333.               basic program. Let's assume you want your new menu TEST.BAS
  334.               to start at line number 500.
  335.               Type RENUM 500 and press ENTER.
  336.               Now we must re-save the TEST.BAS in ASCII format.
  337.               Type SAVE"B:TEST",A
  338.               The A is very important here. It tells BASIC to save the codeè              in ASCII format so it can be merged with other programs.
  339.  
  340.               Insert the diskette that holds your BASIC program that you
  341.               want to merge the generated DURA SCREEN code into.
  342.               type LOAD"B:FILENAME" (substitute FILENAME with your BASIC
  343.               program name. Press ENTER.
  344.               insert the diskette that holds your new TEST.BAS program
  345.               that you just renumbered and resaved.
  346.               Type MERGE"B:TEST" and press ENTER.
  347.               Of course, all this will be easier if you put a copy of BASIC
  348.               on your drive B: diskette to start with. It will prevent all
  349.               the diskette swapping.
  350.  
  351.               Now you can run or resave your program with the new fancy
  352.               menu created by Dura Screen. It should run without any changes.
  353.